<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopEventTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_event', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('shop_id')->comment('商家id');
            $table->date('event')->comment('活动日期');
            $table->integer('event_type',4)->comment('0：限时翻倍、1：全翻、2：1/2翻倍花、3：1/3翻倍花，依次类推');
            $table->integer('status',4)->default(1)->comment('是否生效');
            $table->dateTime('begin_date')->comment('开始时间');
            $table->dateTime('end_date')->comment('结束时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('shops_events');
    }
}
